import { IPSSysTestCase } from './ipssys-test-case';
import { IPSSysTestModule } from './ipssys-test-module';
import { PSModelObjectImpl } from '../psmodel-object-impl';

export class PSSysTestModuleImpl extends PSModelObjectImpl implements IPSSysTestModule {
  get codeName(): string {
    return this.M.codeName;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get memo(): string {
    return this.M.memo;
  }

  get moduleTag(): string {
    return this.M.moduleTag;
  }

  get moduleTag2(): string {
    return this.M.moduleTag2;
  }

  get name(): string {
    return this.M.name;
  }

  protected pssystestcases: IPSSysTestCase[] | null = null;

  getPSSysTestCases(): IPSSysTestCase[] | null {
    if (this.pssystestcases == null) {
      this.pssystestcases = this.fillChildListModel(this.M.getPSSysTestCases, 'testing.IPSSysTestCase') as IPSSysTestCase[];
    }
    return this.pssystestcases;
  }

  get psSysTestCases(): IPSSysTestCase[] | null {
    return this.getPSSysTestCases();
  }

  findPSSysTestCase(objKey: any): IPSSysTestCase | null {
    return this.getPSModel5('testing.IPSSysTestCase', this.getPSSysTestCases(), objKey) as IPSSysTestCase;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get cls(): string {
    return 'PSSysTestModuleImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'testing.IPSSysTestModule') return true;
    return super.instanceof(cls);
  }
}
